<template>
    <div class="app" id="main"></div>
</template>

<script>
import * as echarts from 'echarts';
    export default {
        data(){
            return{

            }
        },
        methods:{
            getInfo(){
                var chartDom = document.getElementById('main');
var myChart = echarts.init(chartDom);
var option;

option = {
  xAxis: {
    type: 'category',
    data: [
      '一月',
      '二月',
      '三月',
      '四月',
      '五月',
      '六月',
      '七月',
      '八月',
      '九月',
      '十月',
      '十一月',
      '十二月'
    ]
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      data: [100, 200, 300, 400, 500, 600, 700, 600, 500, 400, 300, 200],
      type: 'line'
    }
  ]
};

option && myChart.setOption(option);

            }
        },
        mounted(){
             this.getInfo()
        }
    }
</script>

<style lang="scss" scoped>
.app{
    flex: 1;
    // background-color: rgb(215, 230, 17);
}
</style>